package com.magicmovie.api.controller;

import com.magicmovie.api.service.DictionaryService;
import com.magicmovie.util.common.AjaxMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api")
public class DictionaryController {
    @Autowired
    private DictionaryService dictionaryService;

    @RequestMapping(value = "/dictionary/getRechargeList",method = RequestMethod.GET)
    public AjaxMsg getRechargeList(){
        List<Map<String, Object>> recharge = dictionaryService.findByKeyNo("MOVIE_RECHARGE");
        return new AjaxMsg(recharge);
    }

}
